package com.liuzh.deviceinfo.appinfo.appanalyze;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.TextView;
import com.github.mikephil.charting.charts.PieChart;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

public class AppsAnalyzeResultDetailView extends ScrollView {
    public PieChart a;
    public TextView b;
    public TextView c;
    public LinearLayout d;
    public DecimalFormat e = new DecimalFormat("###,###,##0.0");

    public static class a {
        public int a;
        public String b;
        public int c;
        public final List<String> d;
        public Drawable e;

        public a(String str, int i, int i2, List<String> list, Drawable drawable) {
            ArrayList arrayList = new ArrayList();
            this.d = arrayList;
            this.b = str;
            this.a = i;
            this.c = i2;
            arrayList.addAll(list);
            this.e = drawable;
        }
    }

    public static class b {
        public TextView a;
        public TextView b;
        public ProgressBar c;
        public View d;
        public View e;
        public ImageView f;

        public b(View view) {
            this.e = view;
            this.a = (TextView) view.findViewById(2131297291);
            this.b = (TextView) view.findViewById(2131297281);
            this.c = (ProgressBar) view.findViewById(2131296807);
            this.d = view.findViewById(2131296465);
            this.f = (ImageView) view.findViewById(2131296628);
        }
    }

    public AppsAnalyzeResultDetailView(Context context) {
        super(context);
        ScrollView.inflate(getContext(), 2131492905, this);
        this.d = (LinearLayout) findViewById(2131296478);
        this.a = (PieChart) findViewById(2131296796);
        this.b = (TextView) findViewById(2131297291);
        this.c = (TextView) findViewById(2131297287);
        setBackgroundColor(c.f.a.a.a.a.n(getContext(), 16842801));
        setClipChildren(false);
        setClipToPadding(false);
    }

    public final String a(float f) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(this.e.format((double) (f * 100.0f)));
        stringBuilder.append("%");
        return stringBuilder.toString();
    }
}
